//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS RolesAnywhere service.
///
/// Identity and Access Management Roles Anywhere provides a secure way for your workloads such as servers, containers, and applications that run outside of Amazon Web Services to obtain temporary Amazon Web Services credentials. Your workloads can use the same IAM policies and roles you have for native Amazon Web Services applications to access Amazon Web Services resources. Using IAM Roles Anywhere eliminates the need to manage long-term credentials for workloads running outside of Amazon Web Services.  To use IAM Roles Anywhere, your workloads must use X.509 certificates issued by their certificate authority (CA). You register the CA with IAM Roles Anywhere as a trust anchor to establish trust between your public key infrastructure (PKI) and IAM Roles Anywhere. If you don't manage your own PKI system, you can use Private Certificate Authority to create a CA and then use that to establish trust with IAM Roles Anywhere.  This guide describes the IAM Roles Anywhere operations that you can call programmatically. For more information about IAM Roles Anywhere, see the IAM Roles Anywhere User Guide.
public struct RolesAnywhere: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the RolesAnywhere client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "RolesAnywhere",
            serviceIdentifier: "rolesanywhere",
            serviceProtocol: .restjson,
            apiVersion: "2018-05-10",
            endpoint: endpoint,
            variantEndpoints: Self.variantEndpoints,
            errorType: RolesAnywhereErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }




    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.fips]: .init(endpoints: [
            "us-east-1": "rolesanywhere-fips.us-east-1.amazonaws.com",
            "us-east-2": "rolesanywhere-fips.us-east-2.amazonaws.com",
            "us-gov-east-1": "rolesanywhere-fips.us-gov-east-1.amazonaws.com",
            "us-gov-west-1": "rolesanywhere-fips.us-gov-west-1.amazonaws.com",
            "us-west-1": "rolesanywhere-fips.us-west-1.amazonaws.com",
            "us-west-2": "rolesanywhere-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Creates a profile, a list of the roles that Roles Anywhere service is trusted to assume. You use profiles to intersect permissions with IAM managed policies.  Required permissions:  rolesanywhere:CreateProfile.
    @Sendable
    @inlinable
    public func createProfile(_ input: CreateProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ProfileDetailResponse {
        try await self.client.execute(
            operation: "CreateProfile", 
            path: "/profiles", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a profile, a list of the roles that Roles Anywhere service is trusted to assume. You use profiles to intersect permissions with IAM managed policies.  Required permissions:  rolesanywhere:CreateProfile.
    ///
    /// Parameters:
    ///   - acceptRoleSessionName: Used to determine if a custom role session name will be accepted in a temporary credential request.
    ///   - durationSeconds:  Used to determine how long sessions vended using this profile are valid for. See the Expiration section of the
    ///   - enabled: Specifies whether the profile is enabled.
    ///   - managedPolicyArns: A list of managed policy ARNs that apply to the vended session credentials.
    ///   - name: The name of the profile.
    ///   - requireInstanceProperties: Specifies whether instance properties are required in temporary credential requests with this profile.
    ///   - roleArns: A list of IAM roles that this profile can assume in a temporary credential request.
    ///   - sessionPolicy: A session policy that applies to the trust boundary of the vended session credentials.
    ///   - tags: The tags to attach to the profile.
    ///   - logger: Logger use during operation
    @inlinable
    public func createProfile(
        acceptRoleSessionName: Bool? = nil,
        durationSeconds: Int? = nil,
        enabled: Bool? = nil,
        managedPolicyArns: [String]? = nil,
        name: String,
        requireInstanceProperties: Bool? = nil,
        roleArns: [String],
        sessionPolicy: String? = nil,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ProfileDetailResponse {
        let input = CreateProfileRequest(
            acceptRoleSessionName: acceptRoleSessionName, 
            durationSeconds: durationSeconds, 
            enabled: enabled, 
            managedPolicyArns: managedPolicyArns, 
            name: name, 
            requireInstanceProperties: requireInstanceProperties, 
            roleArns: roleArns, 
            sessionPolicy: sessionPolicy, 
            tags: tags
        )
        return try await self.createProfile(input, logger: logger)
    }

    /// Creates a trust anchor to establish trust between IAM Roles Anywhere and your certificate authority (CA). You can define a trust anchor as a reference to an Private Certificate Authority (Private CA) or by uploading a CA certificate. Your Amazon Web Services workloads can authenticate with the trust anchor using certificates issued by the CA in exchange for temporary Amazon Web Services credentials.  Required permissions:  rolesanywhere:CreateTrustAnchor.
    @Sendable
    @inlinable
    public func createTrustAnchor(_ input: CreateTrustAnchorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TrustAnchorDetailResponse {
        try await self.client.execute(
            operation: "CreateTrustAnchor", 
            path: "/trustanchors", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a trust anchor to establish trust between IAM Roles Anywhere and your certificate authority (CA). You can define a trust anchor as a reference to an Private Certificate Authority (Private CA) or by uploading a CA certificate. Your Amazon Web Services workloads can authenticate with the trust anchor using certificates issued by the CA in exchange for temporary Amazon Web Services credentials.  Required permissions:  rolesanywhere:CreateTrustAnchor.
    ///
    /// Parameters:
    ///   - enabled: Specifies whether the trust anchor is enabled.
    ///   - name: The name of the trust anchor.
    ///   - notificationSettings: A list of notification settings to be associated to the trust anchor.
    ///   - source: The trust anchor type and its related certificate data.
    ///   - tags: The tags to attach to the trust anchor.
    ///   - logger: Logger use during operation
    @inlinable
    public func createTrustAnchor(
        enabled: Bool? = nil,
        name: String,
        notificationSettings: [NotificationSetting]? = nil,
        source: Source,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TrustAnchorDetailResponse {
        let input = CreateTrustAnchorRequest(
            enabled: enabled, 
            name: name, 
            notificationSettings: notificationSettings, 
            source: source, 
            tags: tags
        )
        return try await self.createTrustAnchor(input, logger: logger)
    }

    /// Delete an entry from the attribute mapping rules enforced by a given profile.
    @Sendable
    @inlinable
    public func deleteAttributeMapping(_ input: DeleteAttributeMappingRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteAttributeMappingResponse {
        try await self.client.execute(
            operation: "DeleteAttributeMapping", 
            path: "/profiles/{profileId}/mappings", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Delete an entry from the attribute mapping rules enforced by a given profile.
    ///
    /// Parameters:
    ///   - certificateField: Fields (x509Subject, x509Issuer and x509SAN) within X.509 certificates.
    ///   - profileId: The unique identifier of the profile.
    ///   - specifiers: A list of specifiers of a certificate field; for example, CN, OU, UID from a Subject.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteAttributeMapping(
        certificateField: CertificateField,
        profileId: String,
        specifiers: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteAttributeMappingResponse {
        let input = DeleteAttributeMappingRequest(
            certificateField: certificateField, 
            profileId: profileId, 
            specifiers: specifiers
        )
        return try await self.deleteAttributeMapping(input, logger: logger)
    }

    /// Deletes a certificate revocation list (CRL).  Required permissions:  rolesanywhere:DeleteCrl.
    @Sendable
    @inlinable
    public func deleteCrl(_ input: ScalarCrlRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CrlDetailResponse {
        try await self.client.execute(
            operation: "DeleteCrl", 
            path: "/crl/{crlId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a certificate revocation list (CRL).  Required permissions:  rolesanywhere:DeleteCrl.
    ///
    /// Parameters:
    ///   - crlId: The unique identifier of the certificate revocation list (CRL).
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteCrl(
        crlId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CrlDetailResponse {
        let input = ScalarCrlRequest(
            crlId: crlId
        )
        return try await self.deleteCrl(input, logger: logger)
    }

    /// Deletes a profile.  Required permissions:  rolesanywhere:DeleteProfile.
    @Sendable
    @inlinable
    public func deleteProfile(_ input: ScalarProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ProfileDetailResponse {
        try await self.client.execute(
            operation: "DeleteProfile", 
            path: "/profile/{profileId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a profile.  Required permissions:  rolesanywhere:DeleteProfile.
    ///
    /// Parameters:
    ///   - profileId: The unique identifier of the profile.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteProfile(
        profileId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ProfileDetailResponse {
        let input = ScalarProfileRequest(
            profileId: profileId
        )
        return try await self.deleteProfile(input, logger: logger)
    }

    /// Deletes a trust anchor.  Required permissions:  rolesanywhere:DeleteTrustAnchor.
    @Sendable
    @inlinable
    public func deleteTrustAnchor(_ input: ScalarTrustAnchorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TrustAnchorDetailResponse {
        try await self.client.execute(
            operation: "DeleteTrustAnchor", 
            path: "/trustanchor/{trustAnchorId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a trust anchor.  Required permissions:  rolesanywhere:DeleteTrustAnchor.
    ///
    /// Parameters:
    ///   - trustAnchorId: The unique identifier of the trust anchor.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteTrustAnchor(
        trustAnchorId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TrustAnchorDetailResponse {
        let input = ScalarTrustAnchorRequest(
            trustAnchorId: trustAnchorId
        )
        return try await self.deleteTrustAnchor(input, logger: logger)
    }

    /// Disables a certificate revocation list (CRL).  Required permissions:  rolesanywhere:DisableCrl.
    @Sendable
    @inlinable
    public func disableCrl(_ input: ScalarCrlRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CrlDetailResponse {
        try await self.client.execute(
            operation: "DisableCrl", 
            path: "/crl/{crlId}/disable", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Disables a certificate revocation list (CRL).  Required permissions:  rolesanywhere:DisableCrl.
    ///
    /// Parameters:
    ///   - crlId: The unique identifier of the certificate revocation list (CRL).
    ///   - logger: Logger use during operation
    @inlinable
    public func disableCrl(
        crlId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CrlDetailResponse {
        let input = ScalarCrlRequest(
            crlId: crlId
        )
        return try await self.disableCrl(input, logger: logger)
    }

    /// Disables a profile. When disabled, temporary credential requests with this profile fail.  Required permissions:  rolesanywhere:DisableProfile.
    @Sendable
    @inlinable
    public func disableProfile(_ input: ScalarProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ProfileDetailResponse {
        try await self.client.execute(
            operation: "DisableProfile", 
            path: "/profile/{profileId}/disable", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Disables a profile. When disabled, temporary credential requests with this profile fail.  Required permissions:  rolesanywhere:DisableProfile.
    ///
    /// Parameters:
    ///   - profileId: The unique identifier of the profile.
    ///   - logger: Logger use during operation
    @inlinable
    public func disableProfile(
        profileId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ProfileDetailResponse {
        let input = ScalarProfileRequest(
            profileId: profileId
        )
        return try await self.disableProfile(input, logger: logger)
    }

    /// Disables a trust anchor. When disabled, temporary credential requests specifying this trust anchor are unauthorized.  Required permissions:  rolesanywhere:DisableTrustAnchor.
    @Sendable
    @inlinable
    public func disableTrustAnchor(_ input: ScalarTrustAnchorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TrustAnchorDetailResponse {
        try await self.client.execute(
            operation: "DisableTrustAnchor", 
            path: "/trustanchor/{trustAnchorId}/disable", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Disables a trust anchor. When disabled, temporary credential requests specifying this trust anchor are unauthorized.  Required permissions:  rolesanywhere:DisableTrustAnchor.
    ///
    /// Parameters:
    ///   - trustAnchorId: The unique identifier of the trust anchor.
    ///   - logger: Logger use during operation
    @inlinable
    public func disableTrustAnchor(
        trustAnchorId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TrustAnchorDetailResponse {
        let input = ScalarTrustAnchorRequest(
            trustAnchorId: trustAnchorId
        )
        return try await self.disableTrustAnchor(input, logger: logger)
    }

    /// Enables a certificate revocation list (CRL). When enabled, certificates stored in the CRL are unauthorized to receive session credentials.  Required permissions:  rolesanywhere:EnableCrl.
    @Sendable
    @inlinable
    public func enableCrl(_ input: ScalarCrlRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CrlDetailResponse {
        try await self.client.execute(
            operation: "EnableCrl", 
            path: "/crl/{crlId}/enable", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Enables a certificate revocation list (CRL). When enabled, certificates stored in the CRL are unauthorized to receive session credentials.  Required permissions:  rolesanywhere:EnableCrl.
    ///
    /// Parameters:
    ///   - crlId: The unique identifier of the certificate revocation list (CRL).
    ///   - logger: Logger use during operation
    @inlinable
    public func enableCrl(
        crlId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CrlDetailResponse {
        let input = ScalarCrlRequest(
            crlId: crlId
        )
        return try await self.enableCrl(input, logger: logger)
    }

    /// Enables temporary credential requests for a profile.   Required permissions:  rolesanywhere:EnableProfile.
    @Sendable
    @inlinable
    public func enableProfile(_ input: ScalarProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ProfileDetailResponse {
        try await self.client.execute(
            operation: "EnableProfile", 
            path: "/profile/{profileId}/enable", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Enables temporary credential requests for a profile.   Required permissions:  rolesanywhere:EnableProfile.
    ///
    /// Parameters:
    ///   - profileId: The unique identifier of the profile.
    ///   - logger: Logger use during operation
    @inlinable
    public func enableProfile(
        profileId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ProfileDetailResponse {
        let input = ScalarProfileRequest(
            profileId: profileId
        )
        return try await self.enableProfile(input, logger: logger)
    }

    /// Enables a trust anchor. When enabled, certificates in the trust anchor chain are authorized for trust validation.   Required permissions:  rolesanywhere:EnableTrustAnchor.
    @Sendable
    @inlinable
    public func enableTrustAnchor(_ input: ScalarTrustAnchorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TrustAnchorDetailResponse {
        try await self.client.execute(
            operation: "EnableTrustAnchor", 
            path: "/trustanchor/{trustAnchorId}/enable", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Enables a trust anchor. When enabled, certificates in the trust anchor chain are authorized for trust validation.   Required permissions:  rolesanywhere:EnableTrustAnchor.
    ///
    /// Parameters:
    ///   - trustAnchorId: The unique identifier of the trust anchor.
    ///   - logger: Logger use during operation
    @inlinable
    public func enableTrustAnchor(
        trustAnchorId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TrustAnchorDetailResponse {
        let input = ScalarTrustAnchorRequest(
            trustAnchorId: trustAnchorId
        )
        return try await self.enableTrustAnchor(input, logger: logger)
    }

    /// Gets a certificate revocation list (CRL).  Required permissions:  rolesanywhere:GetCrl.
    @Sendable
    @inlinable
    public func getCrl(_ input: ScalarCrlRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CrlDetailResponse {
        try await self.client.execute(
            operation: "GetCrl", 
            path: "/crl/{crlId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets a certificate revocation list (CRL).  Required permissions:  rolesanywhere:GetCrl.
    ///
    /// Parameters:
    ///   - crlId: The unique identifier of the certificate revocation list (CRL).
    ///   - logger: Logger use during operation
    @inlinable
    public func getCrl(
        crlId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CrlDetailResponse {
        let input = ScalarCrlRequest(
            crlId: crlId
        )
        return try await self.getCrl(input, logger: logger)
    }

    /// Gets a profile.  Required permissions:  rolesanywhere:GetProfile.
    @Sendable
    @inlinable
    public func getProfile(_ input: ScalarProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ProfileDetailResponse {
        try await self.client.execute(
            operation: "GetProfile", 
            path: "/profile/{profileId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets a profile.  Required permissions:  rolesanywhere:GetProfile.
    ///
    /// Parameters:
    ///   - profileId: The unique identifier of the profile.
    ///   - logger: Logger use during operation
    @inlinable
    public func getProfile(
        profileId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ProfileDetailResponse {
        let input = ScalarProfileRequest(
            profileId: profileId
        )
        return try await self.getProfile(input, logger: logger)
    }

    /// Gets a subject, which associates a certificate identity with authentication attempts. The subject stores auditing information such as the status of the last authentication attempt, the certificate data used in the attempt, and the last time the associated identity attempted authentication.   Required permissions:  rolesanywhere:GetSubject.
    @Sendable
    @inlinable
    public func getSubject(_ input: ScalarSubjectRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> SubjectDetailResponse {
        try await self.client.execute(
            operation: "GetSubject", 
            path: "/subject/{subjectId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets a subject, which associates a certificate identity with authentication attempts. The subject stores auditing information such as the status of the last authentication attempt, the certificate data used in the attempt, and the last time the associated identity attempted authentication.   Required permissions:  rolesanywhere:GetSubject.
    ///
    /// Parameters:
    ///   - subjectId: The unique identifier of the subject.
    ///   - logger: Logger use during operation
    @inlinable
    public func getSubject(
        subjectId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> SubjectDetailResponse {
        let input = ScalarSubjectRequest(
            subjectId: subjectId
        )
        return try await self.getSubject(input, logger: logger)
    }

    /// Gets a trust anchor.  Required permissions:  rolesanywhere:GetTrustAnchor.
    @Sendable
    @inlinable
    public func getTrustAnchor(_ input: ScalarTrustAnchorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TrustAnchorDetailResponse {
        try await self.client.execute(
            operation: "GetTrustAnchor", 
            path: "/trustanchor/{trustAnchorId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets a trust anchor.  Required permissions:  rolesanywhere:GetTrustAnchor.
    ///
    /// Parameters:
    ///   - trustAnchorId: The unique identifier of the trust anchor.
    ///   - logger: Logger use during operation
    @inlinable
    public func getTrustAnchor(
        trustAnchorId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TrustAnchorDetailResponse {
        let input = ScalarTrustAnchorRequest(
            trustAnchorId: trustAnchorId
        )
        return try await self.getTrustAnchor(input, logger: logger)
    }

    /// Imports the certificate revocation list (CRL). A CRL is a list of certificates that have been revoked by the issuing certificate Authority (CA).In order to be properly imported, a CRL must be in PEM  format. IAM Roles Anywhere validates against the CRL before issuing credentials.   Required permissions:  rolesanywhere:ImportCrl.
    @Sendable
    @inlinable
    public func importCrl(_ input: ImportCrlRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CrlDetailResponse {
        try await self.client.execute(
            operation: "ImportCrl", 
            path: "/crls", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Imports the certificate revocation list (CRL). A CRL is a list of certificates that have been revoked by the issuing certificate Authority (CA).In order to be properly imported, a CRL must be in PEM  format. IAM Roles Anywhere validates against the CRL before issuing credentials.   Required permissions:  rolesanywhere:ImportCrl.
    ///
    /// Parameters:
    ///   - crlData: The x509 v3 specified certificate revocation list (CRL).
    ///   - enabled: Specifies whether the certificate revocation list (CRL) is enabled.
    ///   - name: The name of the certificate revocation list (CRL).
    ///   - tags: A list of tags to attach to the certificate revocation list (CRL).
    ///   - trustAnchorArn: The ARN of the TrustAnchor the certificate revocation list (CRL) will provide revocation for.
    ///   - logger: Logger use during operation
    @inlinable
    public func importCrl(
        crlData: AWSBase64Data,
        enabled: Bool? = nil,
        name: String,
        tags: [Tag]? = nil,
        trustAnchorArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CrlDetailResponse {
        let input = ImportCrlRequest(
            crlData: crlData, 
            enabled: enabled, 
            name: name, 
            tags: tags, 
            trustAnchorArn: trustAnchorArn
        )
        return try await self.importCrl(input, logger: logger)
    }

    /// Lists all certificate revocation lists (CRL) in the authenticated account and Amazon Web Services Region.  Required permissions:  rolesanywhere:ListCrls.
    @Sendable
    @inlinable
    public func listCrls(_ input: ListRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListCrlsResponse {
        try await self.client.execute(
            operation: "ListCrls", 
            path: "/crls", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all certificate revocation lists (CRL) in the authenticated account and Amazon Web Services Region.  Required permissions:  rolesanywhere:ListCrls.
    ///
    /// Parameters:
    ///   - nextToken: A token that indicates where the output should continue from, if a previous request did not show all results. To get the next results, make the request again with this value.
    ///   - pageSize: The number of resources in the paginated list.
    ///   - logger: Logger use during operation
    @inlinable
    public func listCrls(
        nextToken: String? = nil,
        pageSize: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListCrlsResponse {
        let input = ListRequest(
            nextToken: nextToken, 
            pageSize: pageSize
        )
        return try await self.listCrls(input, logger: logger)
    }

    /// Lists all profiles in the authenticated account and Amazon Web Services Region.  Required permissions:  rolesanywhere:ListProfiles.
    @Sendable
    @inlinable
    public func listProfiles(_ input: ListRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListProfilesResponse {
        try await self.client.execute(
            operation: "ListProfiles", 
            path: "/profiles", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all profiles in the authenticated account and Amazon Web Services Region.  Required permissions:  rolesanywhere:ListProfiles.
    ///
    /// Parameters:
    ///   - nextToken: A token that indicates where the output should continue from, if a previous request did not show all results. To get the next results, make the request again with this value.
    ///   - pageSize: The number of resources in the paginated list.
    ///   - logger: Logger use during operation
    @inlinable
    public func listProfiles(
        nextToken: String? = nil,
        pageSize: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListProfilesResponse {
        let input = ListRequest(
            nextToken: nextToken, 
            pageSize: pageSize
        )
        return try await self.listProfiles(input, logger: logger)
    }

    /// Lists the subjects in the authenticated account and Amazon Web Services Region.  Required permissions:  rolesanywhere:ListSubjects.
    @Sendable
    @inlinable
    public func listSubjects(_ input: ListRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListSubjectsResponse {
        try await self.client.execute(
            operation: "ListSubjects", 
            path: "/subjects", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the subjects in the authenticated account and Amazon Web Services Region.  Required permissions:  rolesanywhere:ListSubjects.
    ///
    /// Parameters:
    ///   - nextToken: A token that indicates where the output should continue from, if a previous request did not show all results. To get the next results, make the request again with this value.
    ///   - pageSize: The number of resources in the paginated list.
    ///   - logger: Logger use during operation
    @inlinable
    public func listSubjects(
        nextToken: String? = nil,
        pageSize: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListSubjectsResponse {
        let input = ListRequest(
            nextToken: nextToken, 
            pageSize: pageSize
        )
        return try await self.listSubjects(input, logger: logger)
    }

    /// Lists the tags attached to the resource.  Required permissions:  rolesanywhere:ListTagsForResource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/ListTagsForResource", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the tags attached to the resource.  Required permissions:  rolesanywhere:ListTagsForResource.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Lists the trust anchors in the authenticated account and Amazon Web Services Region.  Required permissions:  rolesanywhere:ListTrustAnchors.
    @Sendable
    @inlinable
    public func listTrustAnchors(_ input: ListRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTrustAnchorsResponse {
        try await self.client.execute(
            operation: "ListTrustAnchors", 
            path: "/trustanchors", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the trust anchors in the authenticated account and Amazon Web Services Region.  Required permissions:  rolesanywhere:ListTrustAnchors.
    ///
    /// Parameters:
    ///   - nextToken: A token that indicates where the output should continue from, if a previous request did not show all results. To get the next results, make the request again with this value.
    ///   - pageSize: The number of resources in the paginated list.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTrustAnchors(
        nextToken: String? = nil,
        pageSize: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTrustAnchorsResponse {
        let input = ListRequest(
            nextToken: nextToken, 
            pageSize: pageSize
        )
        return try await self.listTrustAnchors(input, logger: logger)
    }

    /// Put an entry in the attribute mapping rules that will be enforced by a given profile.  A mapping specifies a certificate field and one or more specifiers that have contextual meanings.
    @Sendable
    @inlinable
    public func putAttributeMapping(_ input: PutAttributeMappingRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutAttributeMappingResponse {
        try await self.client.execute(
            operation: "PutAttributeMapping", 
            path: "/profiles/{profileId}/mappings", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Put an entry in the attribute mapping rules that will be enforced by a given profile.  A mapping specifies a certificate field and one or more specifiers that have contextual meanings.
    ///
    /// Parameters:
    ///   - certificateField: Fields (x509Subject, x509Issuer and x509SAN) within X.509 certificates.
    ///   - mappingRules: A list of mapping entries for every supported specifier or sub-field.
    ///   - profileId: The unique identifier of the profile.
    ///   - logger: Logger use during operation
    @inlinable
    public func putAttributeMapping(
        certificateField: CertificateField,
        mappingRules: [MappingRule],
        profileId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutAttributeMappingResponse {
        let input = PutAttributeMappingRequest(
            certificateField: certificateField, 
            mappingRules: mappingRules, 
            profileId: profileId
        )
        return try await self.putAttributeMapping(input, logger: logger)
    }

    /// Attaches a list of notification settings to a trust anchor. A notification setting includes information such as event name, threshold, status of the notification setting, and the channel to notify.  Required permissions:  rolesanywhere:PutNotificationSettings.
    @Sendable
    @inlinable
    public func putNotificationSettings(_ input: PutNotificationSettingsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutNotificationSettingsResponse {
        try await self.client.execute(
            operation: "PutNotificationSettings", 
            path: "/put-notifications-settings", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Attaches a list of notification settings to a trust anchor. A notification setting includes information such as event name, threshold, status of the notification setting, and the channel to notify.  Required permissions:  rolesanywhere:PutNotificationSettings.
    ///
    /// Parameters:
    ///   - notificationSettings: A list of notification settings to be associated to the trust anchor.
    ///   - trustAnchorId: The unique identifier of the trust anchor.
    ///   - logger: Logger use during operation
    @inlinable
    public func putNotificationSettings(
        notificationSettings: [NotificationSetting],
        trustAnchorId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutNotificationSettingsResponse {
        let input = PutNotificationSettingsRequest(
            notificationSettings: notificationSettings, 
            trustAnchorId: trustAnchorId
        )
        return try await self.putNotificationSettings(input, logger: logger)
    }

    /// Resets the custom notification setting to IAM Roles Anywhere default setting.   Required permissions:  rolesanywhere:ResetNotificationSettings.
    @Sendable
    @inlinable
    public func resetNotificationSettings(_ input: ResetNotificationSettingsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ResetNotificationSettingsResponse {
        try await self.client.execute(
            operation: "ResetNotificationSettings", 
            path: "/reset-notifications-settings", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Resets the custom notification setting to IAM Roles Anywhere default setting.   Required permissions:  rolesanywhere:ResetNotificationSettings.
    ///
    /// Parameters:
    ///   - notificationSettingKeys: A list of notification setting keys to reset. A notification setting key includes the event and the channel.
    ///   - trustAnchorId: The unique identifier of the trust anchor.
    ///   - logger: Logger use during operation
    @inlinable
    public func resetNotificationSettings(
        notificationSettingKeys: [NotificationSettingKey],
        trustAnchorId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ResetNotificationSettingsResponse {
        let input = ResetNotificationSettingsRequest(
            notificationSettingKeys: notificationSettingKeys, 
            trustAnchorId: trustAnchorId
        )
        return try await self.resetNotificationSettings(input, logger: logger)
    }

    /// Attaches tags to a resource.  Required permissions:  rolesanywhere:TagResource.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/TagResource", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Attaches tags to a resource.  Required permissions:  rolesanywhere:TagResource.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the resource.
    ///   - tags: The tags to attach to the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes tags from the resource.  Required permissions:  rolesanywhere:UntagResource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/UntagResource", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes tags from the resource.  Required permissions:  rolesanywhere:UntagResource.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the resource.
    ///   - tagKeys: A list of keys. Tag keys are the unique identifiers of tags.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates the certificate revocation list (CRL). A CRL is a list of certificates that have been revoked by the issuing certificate authority (CA). IAM Roles Anywhere validates against the CRL before issuing credentials.  Required permissions:  rolesanywhere:UpdateCrl.
    @Sendable
    @inlinable
    public func updateCrl(_ input: UpdateCrlRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CrlDetailResponse {
        try await self.client.execute(
            operation: "UpdateCrl", 
            path: "/crl/{crlId}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the certificate revocation list (CRL). A CRL is a list of certificates that have been revoked by the issuing certificate authority (CA). IAM Roles Anywhere validates against the CRL before issuing credentials.  Required permissions:  rolesanywhere:UpdateCrl.
    ///
    /// Parameters:
    ///   - crlData: The x509 v3 specified certificate revocation list (CRL).
    ///   - crlId: The unique identifier of the certificate revocation list (CRL).
    ///   - name: The name of the Crl.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateCrl(
        crlData: AWSBase64Data? = nil,
        crlId: String,
        name: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CrlDetailResponse {
        let input = UpdateCrlRequest(
            crlData: crlData, 
            crlId: crlId, 
            name: name
        )
        return try await self.updateCrl(input, logger: logger)
    }

    /// Updates a profile, a list of the roles that IAM Roles Anywhere service is trusted to assume. You use profiles to intersect permissions with IAM managed policies.  Required permissions:  rolesanywhere:UpdateProfile.
    @Sendable
    @inlinable
    public func updateProfile(_ input: UpdateProfileRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ProfileDetailResponse {
        try await self.client.execute(
            operation: "UpdateProfile", 
            path: "/profile/{profileId}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a profile, a list of the roles that IAM Roles Anywhere service is trusted to assume. You use profiles to intersect permissions with IAM managed policies.  Required permissions:  rolesanywhere:UpdateProfile.
    ///
    /// Parameters:
    ///   - acceptRoleSessionName: Used to determine if a custom role session name will be accepted in a temporary credential request.
    ///   - durationSeconds:  Used to determine how long sessions vended using this profile are valid for. See the Expiration section of the
    ///   - managedPolicyArns: A list of managed policy ARNs that apply to the vended session credentials.
    ///   - name: The name of the profile.
    ///   - profileId: The unique identifier of the profile.
    ///   - roleArns: A list of IAM roles that this profile can assume in a temporary credential request.
    ///   - sessionPolicy: A session policy that applies to the trust boundary of the vended session credentials.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateProfile(
        acceptRoleSessionName: Bool? = nil,
        durationSeconds: Int? = nil,
        managedPolicyArns: [String]? = nil,
        name: String? = nil,
        profileId: String,
        roleArns: [String]? = nil,
        sessionPolicy: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ProfileDetailResponse {
        let input = UpdateProfileRequest(
            acceptRoleSessionName: acceptRoleSessionName, 
            durationSeconds: durationSeconds, 
            managedPolicyArns: managedPolicyArns, 
            name: name, 
            profileId: profileId, 
            roleArns: roleArns, 
            sessionPolicy: sessionPolicy
        )
        return try await self.updateProfile(input, logger: logger)
    }

    /// Updates a trust anchor. You establish trust between IAM Roles Anywhere and your certificate authority (CA) by configuring a trust anchor. You can define a trust anchor as a reference to an Private Certificate Authority (Private CA) or by uploading a CA certificate. Your Amazon Web Services workloads can authenticate with the trust anchor using certificates issued by the CA in exchange for temporary Amazon Web Services credentials.  Required permissions:  rolesanywhere:UpdateTrustAnchor.
    @Sendable
    @inlinable
    public func updateTrustAnchor(_ input: UpdateTrustAnchorRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TrustAnchorDetailResponse {
        try await self.client.execute(
            operation: "UpdateTrustAnchor", 
            path: "/trustanchor/{trustAnchorId}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a trust anchor. You establish trust between IAM Roles Anywhere and your certificate authority (CA) by configuring a trust anchor. You can define a trust anchor as a reference to an Private Certificate Authority (Private CA) or by uploading a CA certificate. Your Amazon Web Services workloads can authenticate with the trust anchor using certificates issued by the CA in exchange for temporary Amazon Web Services credentials.  Required permissions:  rolesanywhere:UpdateTrustAnchor.
    ///
    /// Parameters:
    ///   - name: The name of the trust anchor.
    ///   - source: The trust anchor type and its related certificate data.
    ///   - trustAnchorId: The unique identifier of the trust anchor.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateTrustAnchor(
        name: String? = nil,
        source: Source? = nil,
        trustAnchorId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TrustAnchorDetailResponse {
        let input = UpdateTrustAnchorRequest(
            name: name, 
            source: source, 
            trustAnchorId: trustAnchorId
        )
        return try await self.updateTrustAnchor(input, logger: logger)
    }
}

extension RolesAnywhere {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: RolesAnywhere, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension RolesAnywhere {
    /// Return PaginatorSequence for operation ``listCrls(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listCrlsPaginator(
        _ input: ListRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListRequest, ListCrlsResponse> {
        return .init(
            input: input,
            command: self.listCrls,
            inputKey: \ListRequest.nextToken,
            outputKey: \ListCrlsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listCrls(_:logger:)``.
    ///
    /// - Parameters:
    ///   - pageSize: The number of resources in the paginated list.
    ///   - logger: Logger used for logging
    @inlinable
    public func listCrlsPaginator(
        pageSize: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListRequest, ListCrlsResponse> {
        let input = ListRequest(
            pageSize: pageSize
        )
        return self.listCrlsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listProfiles(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfilesPaginator(
        _ input: ListRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListRequest, ListProfilesResponse> {
        return .init(
            input: input,
            command: self.listProfiles,
            inputKey: \ListRequest.nextToken,
            outputKey: \ListProfilesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listProfiles(_:logger:)``.
    ///
    /// - Parameters:
    ///   - pageSize: The number of resources in the paginated list.
    ///   - logger: Logger used for logging
    @inlinable
    public func listProfilesPaginator(
        pageSize: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListRequest, ListProfilesResponse> {
        let input = ListRequest(
            pageSize: pageSize
        )
        return self.listProfilesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listSubjects(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listSubjectsPaginator(
        _ input: ListRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListRequest, ListSubjectsResponse> {
        return .init(
            input: input,
            command: self.listSubjects,
            inputKey: \ListRequest.nextToken,
            outputKey: \ListSubjectsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listSubjects(_:logger:)``.
    ///
    /// - Parameters:
    ///   - pageSize: The number of resources in the paginated list.
    ///   - logger: Logger used for logging
    @inlinable
    public func listSubjectsPaginator(
        pageSize: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListRequest, ListSubjectsResponse> {
        let input = ListRequest(
            pageSize: pageSize
        )
        return self.listSubjectsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listTrustAnchors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listTrustAnchorsPaginator(
        _ input: ListRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListRequest, ListTrustAnchorsResponse> {
        return .init(
            input: input,
            command: self.listTrustAnchors,
            inputKey: \ListRequest.nextToken,
            outputKey: \ListTrustAnchorsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listTrustAnchors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - pageSize: The number of resources in the paginated list.
    ///   - logger: Logger used for logging
    @inlinable
    public func listTrustAnchorsPaginator(
        pageSize: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListRequest, ListTrustAnchorsResponse> {
        let input = ListRequest(
            pageSize: pageSize
        )
        return self.listTrustAnchorsPaginator(input, logger: logger)
    }
}

extension RolesAnywhere.ListRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> RolesAnywhere.ListRequest {
        return .init(
            nextToken: token,
            pageSize: self.pageSize
        )
    }
}
